.class public Lcom/xiaomi/notes/NoteListActivity;
.super Landroid/app/Activity;
.source "NoteListActivity.java"


# static fields
.field public static final KEY_BACKUPED:Ljava/lang/String; = "Backuped"

.field public static final KEY_NOTES_CLIENT_PREFERENCES:Ljava/lang/String; = "NotesClientPref"

.field public static final KEY_RESTORED:Ljava/lang/String; = "Restored"

.field public static final N_CREATE_NEW_NOTE_FLAG:I = -0x1

.field public static final N_DESKTOP_TO_APP_TYPE_FOLDER:I = 0x2

.field public static final N_DESKTOP_TO_APP_TYPE_NOTE:I = 0x1

.field public static final N_DESKTOP_TO_APP_TYPE_WIDGET:I = 0x3

.field public static final N_LISTVIEW_FOLDER_HEIGHT:I = 0x60

.field public static final N_LISTVIEW_SCROLL_RATE:I = 0x14

.field public static final N_ROOT_PATH_FLAG:I = -0x1

.field public static final N_STATE_DELETE:I = 0x1

.field public static final N_STATE_MOVE:I = 0x4

.field public static final N_STATE_NEW_GROUP:I = 0x2

.field public static final N_STATE_NORMAL:I = 0x0

.field public static final N_STATE_NORMAL_GROUP:I = 0x3

.field public static final STR_DESKTOP_TO_APP_EXPAND:Ljava/lang/String; = "DESKTOP_TO_APP_FLAG_EXPAND"

.field public static final STR_DESKTOP_TO_APP_ID:Ljava/lang/String; = "DESKTOP_TO_APP_FLAG_ID"

.field public static final STR_DESKTOP_TO_APP_TYPE:Ljava/lang/String; = "DESKTOP_TO_APP_FLAG_TYPE"

.field public static blnLogin:Z

.field public static context:Lcom/xiaomi/notes/NoteListActivity;


# instance fields
.field private btnAdd:Landroid/widget/ImageButton;

.field private btnEditBack:Landroid/widget/Button;

.field private btnEditOk:Landroid/widget/Button;

.field private btnFolderBack:Landroid/widget/Button;

.field private btnFolderOk:Landroid/widget/Button;

.field private config:Landroid/content/res/Configuration;

.field private db:Lcom/xiaomi/notes/DBOperate;

.field private edtFolderName:Landroid/widget/EditText;

.field private layoutEdit:Landroid/widget/LinearLayout;

.field private layoutFolder:Landroid/widget/LinearLayout;

.field private listNote:Landroid/widget/ListView;

.field private nFolderId:I

.field private nPasswordTrys:I

.field private nPreState:I

.field private nScrollOffsetBottom:I

.field private nScrollOffsetTop:I

.field private nScrollOffsetY:I

.field private nState:I

.field private nWidgetFlag:I

.field private objConfig:[Ljava/lang/Object;

.field private objDrogView:Lcom/xiaomi/notes/DragView;

.field private outMetrics:Landroid/util/DisplayMetrics;

.field private txtFolderName:Landroid/widget/TextView;

.field private txtTitle:Landroid/widget/TextView;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 84
    const/4 v0, 0x0

    sput-object v0, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    return-void
.end method

.method public constructor <init>()V
    .locals 1

    .prologue
    const/4 v0, 0x0

    .line 47
    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    .line 91
    iput-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->txtTitle:Landroid/widget/TextView;

    .line 93
    iput-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->btnAdd:Landroid/widget/ImageButton;

    .line 95
    iput-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->listNote:Landroid/widget/ListView;

    .line 98
    iput-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->layoutEdit:Landroid/widget/LinearLayout;

    .line 100
    iput-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->btnEditOk:Landroid/widget/Button;

    .line 102
    iput-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->btnEditBack:Landroid/widget/Button;

    .line 105
    iput-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->layoutFolder:Landroid/widget/LinearLayout;

    .line 107
    iput-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->edtFolderName:Landroid/widget/EditText;

    .line 109
    iput-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->txtFolderName:Landroid/widget/TextView;

    .line 111
    iput-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->btnFolderOk:Landroid/widget/Button;

    .line 113
    iput-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->btnFolderBack:Landroid/widget/Button;

    .line 115
    iput-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->objDrogView:Lcom/xiaomi/notes/DragView;

    .line 118
    iput-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->db:Lcom/xiaomi/notes/DBOperate;

    .line 120
    const/4 v0, -0x1

    iput v0, p0, Lcom/xiaomi/notes/NoteListActivity;->nFolderId:I

    .line 138
    const/4 v0, 0x0

    iput v0, p0, Lcom/xiaomi/notes/NoteListActivity;->nPasswordTrys:I

    return-void
.end method

.method static synthetic access$000(Lcom/xiaomi/notes/NoteListActivity;)I
    .locals 1
    .parameter "x0"

    .prologue
    .line 47
    iget v0, p0, Lcom/xiaomi/notes/NoteListActivity;->nState:I

    return v0
.end method

.method static synthetic access$100(Lcom/xiaomi/notes/NoteListActivity;)I
    .locals 1
    .parameter "x0"

    .prologue
    .line 47
    iget v0, p0, Lcom/xiaomi/notes/NoteListActivity;->nFolderId:I

    return v0
.end method

.method static synthetic access$1000(Lcom/xiaomi/notes/NoteListActivity;)I
    .locals 1
    .parameter "x0"

    .prologue
    .line 47
    iget v0, p0, Lcom/xiaomi/notes/NoteListActivity;->nPreState:I

    return v0
.end method

.method static synthetic access$102(Lcom/xiaomi/notes/NoteListActivity;I)I
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 47
    iput p1, p0, Lcom/xiaomi/notes/NoteListActivity;->nFolderId:I

    return p1
.end method

.method static synthetic access$1100(Lcom/xiaomi/notes/NoteListActivity;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 47
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteListActivity;->showDeleteDialog()V

    return-void
.end method

.method static synthetic access$1200(Lcom/xiaomi/notes/NoteListActivity;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 47
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteListActivity;->deleteNoteAndFolder()V

    return-void
.end method

.method static synthetic access$1300(Lcom/xiaomi/notes/NoteListActivity;)Landroid/widget/EditText;
    .locals 1
    .parameter "x0"

    .prologue
    .line 47
    iget-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->edtFolderName:Landroid/widget/EditText;

    return-object v0
.end method

.method static synthetic access$1400(Lcom/xiaomi/notes/NoteListActivity;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 47
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteListActivity;->hideSoftKey()V

    return-void
.end method

.method static synthetic access$1500(Lcom/xiaomi/notes/NoteListActivity;)[Ljava/lang/Object;
    .locals 1
    .parameter "x0"

    .prologue
    .line 47
    iget-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->objConfig:[Ljava/lang/Object;

    return-object v0
.end method

.method static synthetic access$1600(Lcom/xiaomi/notes/NoteListActivity;)I
    .locals 1
    .parameter "x0"

    .prologue
    .line 47
    iget v0, p0, Lcom/xiaomi/notes/NoteListActivity;->nPasswordTrys:I

    return v0
.end method

.method static synthetic access$1602(Lcom/xiaomi/notes/NoteListActivity;I)I
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 47
    iput p1, p0, Lcom/xiaomi/notes/NoteListActivity;->nPasswordTrys:I

    return p1
.end method

.method static synthetic access$1608(Lcom/xiaomi/notes/NoteListActivity;)I
    .locals 2
    .parameter "x0"

    .prologue
    .line 47
    iget v0, p0, Lcom/xiaomi/notes/NoteListActivity;->nPasswordTrys:I

    add-int/lit8 v1, v0, 0x1

    iput v1, p0, Lcom/xiaomi/notes/NoteListActivity;->nPasswordTrys:I

    return v0
.end method

.method static synthetic access$1700(Lcom/xiaomi/notes/NoteListActivity;)Landroid/widget/ImageButton;
    .locals 1
    .parameter "x0"

    .prologue
    .line 47
    iget-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->btnAdd:Landroid/widget/ImageButton;

    return-object v0
.end method

.method static synthetic access$1800(Lcom/xiaomi/notes/NoteListActivity;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 47
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteListActivity;->jump()V

    return-void
.end method

.method static synthetic access$1900(Lcom/xiaomi/notes/NoteListActivity;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 47
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteListActivity;->showPasswordErrorDialog()V

    return-void
.end method

.method static synthetic access$200(Lcom/xiaomi/notes/NoteListActivity;J)V
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 47
    invoke-direct {p0, p1, p2}, Lcom/xiaomi/notes/NoteListActivity;->gotoEditNote(J)V

    return-void
.end method

.method static synthetic access$2000(Lcom/xiaomi/notes/NoteListActivity;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 47
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteListActivity;->showInputPasswordDialog()V

    return-void
.end method

.method static synthetic access$2100(Lcom/xiaomi/notes/NoteListActivity;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 47
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteListActivity;->showSettingPasswordDialog()V

    return-void
.end method

.method static synthetic access$2200(Lcom/xiaomi/notes/NoteListActivity;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 47
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteListActivity;->restoreXML2DB()V

    return-void
.end method

.method static synthetic access$300(Lcom/xiaomi/notes/NoteListActivity;)Landroid/widget/ListView;
    .locals 1
    .parameter "x0"

    .prologue
    .line 47
    iget-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->listNote:Landroid/widget/ListView;

    return-object v0
.end method

.method static synthetic access$400(Lcom/xiaomi/notes/NoteListActivity;)Lcom/xiaomi/notes/DragView;
    .locals 1
    .parameter "x0"

    .prologue
    .line 47
    iget-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->objDrogView:Lcom/xiaomi/notes/DragView;

    return-object v0
.end method

.method static synthetic access$402(Lcom/xiaomi/notes/NoteListActivity;Lcom/xiaomi/notes/DragView;)Lcom/xiaomi/notes/DragView;
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 47
    iput-object p1, p0, Lcom/xiaomi/notes/NoteListActivity;->objDrogView:Lcom/xiaomi/notes/DragView;

    return-object p1
.end method

.method static synthetic access$500(Lcom/xiaomi/notes/NoteListActivity;)I
    .locals 1
    .parameter "x0"

    .prologue
    .line 47
    iget v0, p0, Lcom/xiaomi/notes/NoteListActivity;->nScrollOffsetY:I

    return v0
.end method

.method static synthetic access$502(Lcom/xiaomi/notes/NoteListActivity;I)I
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 47
    iput p1, p0, Lcom/xiaomi/notes/NoteListActivity;->nScrollOffsetY:I

    return p1
.end method

.method static synthetic access$512(Lcom/xiaomi/notes/NoteListActivity;I)I
    .locals 1
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 47
    iget v0, p0, Lcom/xiaomi/notes/NoteListActivity;->nScrollOffsetY:I

    add-int/2addr v0, p1

    iput v0, p0, Lcom/xiaomi/notes/NoteListActivity;->nScrollOffsetY:I

    return v0
.end method

.method static synthetic access$600(Lcom/xiaomi/notes/NoteListActivity;)I
    .locals 1
    .parameter "x0"

    .prologue
    .line 47
    iget v0, p0, Lcom/xiaomi/notes/NoteListActivity;->nScrollOffsetTop:I

    return v0
.end method

.method static synthetic access$602(Lcom/xiaomi/notes/NoteListActivity;I)I
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 47
    iput p1, p0, Lcom/xiaomi/notes/NoteListActivity;->nScrollOffsetTop:I

    return p1
.end method

.method static synthetic access$700(Lcom/xiaomi/notes/NoteListActivity;)I
    .locals 1
    .parameter "x0"

    .prologue
    .line 47
    iget v0, p0, Lcom/xiaomi/notes/NoteListActivity;->nScrollOffsetBottom:I

    return v0
.end method

.method static synthetic access$702(Lcom/xiaomi/notes/NoteListActivity;I)I
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 47
    iput p1, p0, Lcom/xiaomi/notes/NoteListActivity;->nScrollOffsetBottom:I

    return p1
.end method

.method static synthetic access$800(Lcom/xiaomi/notes/NoteListActivity;)Lcom/xiaomi/notes/DBOperate;
    .locals 1
    .parameter "x0"

    .prologue
    .line 47
    iget-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->db:Lcom/xiaomi/notes/DBOperate;

    return-object v0
.end method

.method static synthetic access$900(Lcom/xiaomi/notes/NoteListActivity;)Landroid/util/DisplayMetrics;
    .locals 1
    .parameter "x0"

    .prologue
    .line 47
    iget-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->outMetrics:Landroid/util/DisplayMetrics;

    return-object v0
.end method

.method private callDialogToSend(I)V
    .locals 4
    .parameter "type"

    .prologue
    .line 1091
    new-instance v0, Landroid/app/AlertDialog$Builder;

    sget-object v2, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    invoke-direct {v0, v2}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    .line 1093
    .local v0, dialog:Landroid/app/AlertDialog$Builder;
    sget-object v2, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    invoke-virtual {v2}, Lcom/xiaomi/notes/NoteListActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    const/high16 v3, 0x7f06

    invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getStringArray(I)[Ljava/lang/String;

    move-result-object v1

    .line 1094
    .local v1, items:[Ljava/lang/String;
    new-instance v2, Lcom/xiaomi/notes/NoteListActivity$19;

    invoke-direct {v2, p0, p1}, Lcom/xiaomi/notes/NoteListActivity$19;-><init>(Lcom/xiaomi/notes/NoteListActivity;I)V

    invoke-virtual {v0, v1, v2}, Landroid/app/AlertDialog$Builder;->setItems([Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    .line 1142
    invoke-virtual {v0}, Landroid/app/AlertDialog$Builder;->show()Landroid/app/AlertDialog;

    .line 1143
    return-void
.end method

.method private checkPassword()V
    .locals 6

    .prologue
    const/4 v5, 0x0

    .line 677
    iget-object v3, p0, Lcom/xiaomi/notes/NoteListActivity;->objConfig:[Ljava/lang/Object;

    const/4 v4, 0x2

    aget-object v0, v3, v4

    check-cast v0, Ljava/lang/String;

    .line 678
    .local v0, password:Ljava/lang/String;
    iget-object v3, p0, Lcom/xiaomi/notes/NoteListActivity;->objConfig:[Ljava/lang/Object;

    const/4 v4, 0x3

    aget-object v3, v3, v4

    check-cast v3, Ljava/lang/Long;

    invoke-virtual {v3}, Ljava/lang/Long;->longValue()J

    move-result-wide v1

    .line 679
    .local v1, tryTime:J
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v3

    cmp-long v3, v3, v1

    if-gez v3, :cond_0

    .line 680
    sput-boolean v5, Lcom/xiaomi/notes/NoteListActivity;->blnLogin:Z

    .line 681
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteListActivity;->showPasswordErrorDialog()V

    .line 688
    :goto_0
    return-void

    .line 682
    :cond_0
    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v3

    if-nez v3, :cond_1

    .line 683
    sput-boolean v5, Lcom/xiaomi/notes/NoteListActivity;->blnLogin:Z

    .line 684
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteListActivity;->showInputPasswordDialog()V

    goto :goto_0

    .line 686
    :cond_1
    const/4 v3, 0x1

    sput-boolean v3, Lcom/xiaomi/notes/NoteListActivity;->blnLogin:Z

    goto :goto_0
.end method

.method private defineBaseData()V
    .locals 11

    .prologue
    const/4 v3, 0x0

    .line 1063
    iget-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->db:Lcom/xiaomi/notes/DBOperate;

    const-wide/16 v1, 0x0

    const/4 v4, 0x2

    const/4 v5, -0x1

    const/4 v8, 0x1

    const-string v9, "100100000001000001000000"

    sget-object v6, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    invoke-virtual {v6}, Lcom/xiaomi/notes/NoteListActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v6

    const v7, 0x7f05006e

    invoke-virtual {v6, v7}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v10

    move v6, v3

    move v7, v3

    invoke-virtual/range {v0 .. v10}, Lcom/xiaomi/notes/DBOperate;->insertNote(JZIIIIILjava/lang/String;Ljava/lang/String;)J

    .line 1065
    return-void
.end method

.method private deleteNoteAndFolder()V
    .locals 8

    .prologue
    .line 1016
    iget-object v7, p0, Lcom/xiaomi/notes/NoteListActivity;->listNote:Landroid/widget/ListView;

    invoke-virtual {v7}, Landroid/widget/ListView;->getAdapter()Landroid/widget/ListAdapter;

    move-result-object v0

    check-cast v0, Lcom/xiaomi/notes/AdapterNoteItem;

    .line 1017
    .local v0, adapter:Lcom/xiaomi/notes/AdapterNoteItem;
    invoke-virtual {v0}, Lcom/xiaomi/notes/AdapterNoteItem;->getVectorEditFlag()Ljava/util/Set;

    move-result-object v6

    .line 1018
    .local v6, vct:Ljava/util/Set;,"Ljava/util/Set<Ljava/lang/Integer;>;"
    invoke-interface {v6}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v3

    .line 1020
    .local v3, it:Ljava/util/Iterator;,"Ljava/util/Iterator<Ljava/lang/Integer;>;"
    :cond_0
    :goto_0
    invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z

    move-result v7

    if-eqz v7, :cond_2

    .line 1021
    invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v7

    check-cast v7, Ljava/lang/Integer;

    invoke-virtual {v7}, Ljava/lang/Integer;->intValue()I

    move-result v1

    .line 1022
    .local v1, id:I
    invoke-static {v1}, Lcom/xiaomi/notes/NoteListActivity;->isFolder(I)Z

    move-result v7

    if-eqz v7, :cond_1

    .line 1023
    invoke-static {v1}, Lcom/xiaomi/notes/NoteListActivity;->getFolderIdFromDBID(I)I

    move-result v1

    .line 1024
    if-lez v1, :cond_0

    .line 1025
    iget-object v7, p0, Lcom/xiaomi/notes/NoteListActivity;->db:Lcom/xiaomi/notes/DBOperate;

    invoke-virtual {v7, v1}, Lcom/xiaomi/notes/DBOperate;->deleteFolder(I)V

    goto :goto_0

    .line 1027
    :cond_1
    if-lez v1, :cond_0

    .line 1028
    iget-object v7, p0, Lcom/xiaomi/notes/NoteListActivity;->db:Lcom/xiaomi/notes/DBOperate;

    invoke-virtual {v7, v1}, Lcom/xiaomi/notes/DBOperate;->getNote(I)Ljava/util/Map;

    move-result-object v2

    .line 1029
    .local v2, info:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    const-string v7, "widgetType"

    invoke-interface {v2, v7}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v7

    check-cast v7, Ljava/lang/Integer;

    invoke-virtual {v7}, Ljava/lang/Integer;->intValue()I

    move-result v5

    .line 1030
    .local v5, nWidgetSize:I
    const-string v7, "widgetId"

    invoke-interface {v2, v7}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v7

    check-cast v7, Ljava/lang/Integer;

    invoke-virtual {v7}, Ljava/lang/Integer;->intValue()I

    move-result v4

    .line 1031
    .local v4, nWidgetId:I
    iget-object v7, p0, Lcom/xiaomi/notes/NoteListActivity;->db:Lcom/xiaomi/notes/DBOperate;

    invoke-virtual {v7, v1}, Lcom/xiaomi/notes/DBOperate;->deleteNote(I)V

    .line 1032
    invoke-static {p0, v4, v5}, Lcom/xiaomi/notes/Tools;->deleteLinkWidget(Landroid/content/Context;II)V

    goto :goto_0

    .line 1035
    .end local v1           #id:I
    .end local v2           #info:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    .end local v4           #nWidgetId:I
    .end local v5           #nWidgetSize:I
    :cond_2
    return-void
.end method

.method public static getFolderIdFromDBID(I)I
    .locals 2
    .parameter "id"

    .prologue
    .line 1193
    neg-int v0, p0

    const/4 v1, 0x1

    sub-int/2addr v0, v1

    return v0
.end method

.method private gotoAbout()V
    .locals 3

    .prologue
    .line 1051
    new-instance v0, Landroid/content/Intent;

    invoke-direct {v0}, Landroid/content/Intent;-><init>()V

    .line 1052
    .local v0, intent:Landroid/content/Intent;
    sget-object v1, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    const-class v2, Lcom/xiaomi/notes/NoteAboutActivity;

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->setClass(Landroid/content/Context;Ljava/lang/Class;)Landroid/content/Intent;

    .line 1053
    invoke-virtual {p0, v0}, Lcom/xiaomi/notes/NoteListActivity;->startActivity(Landroid/content/Intent;)V

    .line 1054
    return-void
.end method

.method private gotoEditNote(J)V
    .locals 3
    .parameter "id"

    .prologue
    .line 1041
    new-instance v0, Landroid/content/Intent;

    invoke-direct {v0}, Landroid/content/Intent;-><init>()V

    .line 1042
    .local v0, intent:Landroid/content/Intent;
    sget-object v1, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    const-class v2, Lcom/xiaomi/notes/NoteEditActivity;

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->setClass(Landroid/content/Context;Ljava/lang/Class;)Landroid/content/Intent;

    .line 1043
    const-string v1, "_id"

    invoke-virtual {v0, v1, p1, p2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;J)Landroid/content/Intent;

    .line 1044
    const-string v1, "folderId"

    iget v2, p0, Lcom/xiaomi/notes/NoteListActivity;->nFolderId:I

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 1045
    const-string v1, "widgetId"

    iget v2, p0, Lcom/xiaomi/notes/NoteListActivity;->nWidgetFlag:I

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 1047
    invoke-virtual {p0, v0}, Lcom/xiaomi/notes/NoteListActivity;->startActivity(Landroid/content/Intent;)V

    .line 1048
    return-void
.end method

.method private gotoMore()V
    .locals 3

    .prologue
    .line 1057
    new-instance v0, Landroid/content/Intent;

    invoke-direct {v0}, Landroid/content/Intent;-><init>()V

    .line 1058
    .local v0, intent:Landroid/content/Intent;
    sget-object v1, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    const-class v2, Lcom/xiaomi/notes/NoteMoreActivity;

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->setClass(Landroid/content/Context;Ljava/lang/Class;)Landroid/content/Intent;

    .line 1059
    invoke-virtual {p0, v0}, Lcom/xiaomi/notes/NoteListActivity;->startActivity(Landroid/content/Intent;)V

    .line 1060
    return-void
.end method

.method private hideSoftKey()V
    .locals 3

    .prologue
    .line 845
    sget-object v1, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    const-string v2, "input_method"

    invoke-virtual {v1, v2}, Lcom/xiaomi/notes/NoteListActivity;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/view/inputmethod/InputMethodManager;

    .line 847
    .local v0, im:Landroid/view/inputmethod/InputMethodManager;
    if-eqz v0, :cond_0

    .line 848
    iget-object v1, p0, Lcom/xiaomi/notes/NoteListActivity;->edtFolderName:Landroid/widget/EditText;

    invoke-virtual {v1}, Landroid/widget/EditText;->getWindowToken()Landroid/os/IBinder;

    move-result-object v1

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Landroid/view/inputmethod/InputMethodManager;->hideSoftInputFromWindow(Landroid/os/IBinder;I)Z

    .line 850
    :cond_0
    return-void
.end method

.method private init()V
    .locals 5

    .prologue
    const/4 v4, 0x2

    const/4 v3, 0x0

    .line 341
    const v1, 0x7f07002c

    invoke-virtual {p0, v1}, Lcom/xiaomi/notes/NoteListActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    iput-object v1, p0, Lcom/xiaomi/notes/NoteListActivity;->txtTitle:Landroid/widget/TextView;

    .line 342
    const v1, 0x7f07002d

    invoke-virtual {p0, v1}, Lcom/xiaomi/notes/NoteListActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/ImageButton;

    iput-object v1, p0, Lcom/xiaomi/notes/NoteListActivity;->btnAdd:Landroid/widget/ImageButton;

    .line 343
    const v1, 0x7f07002e

    invoke-virtual {p0, v1}, Lcom/xiaomi/notes/NoteListActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/ListView;

    iput-object v1, p0, Lcom/xiaomi/notes/NoteListActivity;->listNote:Landroid/widget/ListView;

    .line 344
    const v1, 0x7f07002f

    invoke-virtual {p0, v1}, Lcom/xiaomi/notes/NoteListActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/LinearLayout;

    iput-object v1, p0, Lcom/xiaomi/notes/NoteListActivity;->layoutEdit:Landroid/widget/LinearLayout;

    .line 345
    const v1, 0x7f070030

    invoke-virtual {p0, v1}, Lcom/xiaomi/notes/NoteListActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/Button;

    iput-object v1, p0, Lcom/xiaomi/notes/NoteListActivity;->btnEditOk:Landroid/widget/Button;

    .line 346
    const v1, 0x7f070031

    invoke-virtual {p0, v1}, Lcom/xiaomi/notes/NoteListActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/Button;

    iput-object v1, p0, Lcom/xiaomi/notes/NoteListActivity;->btnEditBack:Landroid/widget/Button;

    .line 348
    const v1, 0x7f070032

    invoke-virtual {p0, v1}, Lcom/xiaomi/notes/NoteListActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/LinearLayout;

    iput-object v1, p0, Lcom/xiaomi/notes/NoteListActivity;->layoutFolder:Landroid/widget/LinearLayout;

    .line 349
    const v1, 0x7f070034

    invoke-virtual {p0, v1}, Lcom/xiaomi/notes/NoteListActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/EditText;

    iput-object v1, p0, Lcom/xiaomi/notes/NoteListActivity;->edtFolderName:Landroid/widget/EditText;

    .line 350
    const v1, 0x7f070033

    invoke-virtual {p0, v1}, Lcom/xiaomi/notes/NoteListActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    iput-object v1, p0, Lcom/xiaomi/notes/NoteListActivity;->txtFolderName:Landroid/widget/TextView;

    .line 351
    const v1, 0x7f070036

    invoke-virtual {p0, v1}, Lcom/xiaomi/notes/NoteListActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/Button;

    iput-object v1, p0, Lcom/xiaomi/notes/NoteListActivity;->btnFolderOk:Landroid/widget/Button;

    .line 352
    const v1, 0x7f070037

    invoke-virtual {p0, v1}, Lcom/xiaomi/notes/NoteListActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/Button;

    iput-object v1, p0, Lcom/xiaomi/notes/NoteListActivity;->btnFolderBack:Landroid/widget/Button;

    .line 354
    sput-object p0, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    .line 355
    sget-object v1, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    invoke-virtual {v1}, Lcom/xiaomi/notes/NoteListActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;

    move-result-object v1

    iput-object v1, p0, Lcom/xiaomi/notes/NoteListActivity;->config:Landroid/content/res/Configuration;

    .line 356
    new-instance v1, Landroid/util/DisplayMetrics;

    invoke-direct {v1}, Landroid/util/DisplayMetrics;-><init>()V

    iput-object v1, p0, Lcom/xiaomi/notes/NoteListActivity;->outMetrics:Landroid/util/DisplayMetrics;

    .line 357
    sget-object v1, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    invoke-virtual {v1}, Lcom/xiaomi/notes/NoteListActivity;->getWindowManager()Landroid/view/WindowManager;

    move-result-object v1

    invoke-interface {v1}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display;

    move-result-object v1

    iget-object v2, p0, Lcom/xiaomi/notes/NoteListActivity;->outMetrics:Landroid/util/DisplayMetrics;

    invoke-virtual {v1, v2}, Landroid/view/Display;->getMetrics(Landroid/util/DisplayMetrics;)V

    .line 359
    invoke-direct {p0, v3}, Lcom/xiaomi/notes/NoteListActivity;->setVisableEditDialog(Z)V

    .line 360
    invoke-direct {p0, v3}, Lcom/xiaomi/notes/NoteListActivity;->setVisableFolderDialog(Z)V

    .line 362
    iput v3, p0, Lcom/xiaomi/notes/NoteListActivity;->nState:I

    .line 363
    iput v3, p0, Lcom/xiaomi/notes/NoteListActivity;->nPreState:I

    .line 364
    const/4 v1, -0x1

    iput v1, p0, Lcom/xiaomi/notes/NoteListActivity;->nFolderId:I

    .line 365
    iput v3, p0, Lcom/xiaomi/notes/NoteListActivity;->nWidgetFlag:I

    .line 367
    new-instance v1, Lcom/xiaomi/notes/DBOperate;

    invoke-direct {v1}, Lcom/xiaomi/notes/DBOperate;-><init>()V

    iput-object v1, p0, Lcom/xiaomi/notes/NoteListActivity;->db:Lcom/xiaomi/notes/DBOperate;

    .line 368
    iget-object v1, p0, Lcom/xiaomi/notes/NoteListActivity;->db:Lcom/xiaomi/notes/DBOperate;

    invoke-virtual {v1, p0}, Lcom/xiaomi/notes/DBOperate;->openDB(Landroid/content/Context;)V

    .line 370
    new-instance v0, Lcom/xiaomi/notes/AdapterNoteItem;

    invoke-direct {v0}, Lcom/xiaomi/notes/AdapterNoteItem;-><init>()V

    .line 371
    .local v0, adapter:Lcom/xiaomi/notes/AdapterNoteItem;
    iget-object v1, p0, Lcom/xiaomi/notes/NoteListActivity;->db:Lcom/xiaomi/notes/DBOperate;

    invoke-virtual {v1, v3}, Lcom/xiaomi/notes/DBOperate;->getFolder(I)Ljava/util/List;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/xiaomi/notes/AdapterNoteItem;->setFolderInfo(Ljava/util/List;)V

    .line 372
    iget-object v1, p0, Lcom/xiaomi/notes/NoteListActivity;->db:Lcom/xiaomi/notes/DBOperate;

    iget v2, p0, Lcom/xiaomi/notes/NoteListActivity;->nFolderId:I

    invoke-virtual {v1, v2}, Lcom/xiaomi/notes/DBOperate;->getNotes(I)Ljava/util/List;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/xiaomi/notes/AdapterNoteItem;->setNoteInfo(Ljava/util/List;)V

    .line 373
    invoke-virtual {v0, v3}, Lcom/xiaomi/notes/AdapterNoteItem;->setEditState(I)V

    .line 375
    iget-object v1, p0, Lcom/xiaomi/notes/NoteListActivity;->config:Landroid/content/res/Configuration;

    iget v1, v1, Landroid/content/res/Configuration;->orientation:I

    if-ne v1, v4, :cond_0

    .line 376
    invoke-virtual {v0, v4}, Lcom/xiaomi/notes/AdapterNoteItem;->setOrientation(I)V

    .line 377
    iget-object v1, p0, Lcom/xiaomi/notes/NoteListActivity;->listNote:Landroid/widget/ListView;

    invoke-virtual {v1, v3, v3, v3, v3}, Landroid/widget/ListView;->setPadding(IIII)V

    .line 382
    :goto_0
    iget-object v1, p0, Lcom/xiaomi/notes/NoteListActivity;->listNote:Landroid/widget/ListView;

    invoke-virtual {v1, v3}, Landroid/widget/ListView;->setCacheColorHint(I)V

    .line 383
    iget-object v1, p0, Lcom/xiaomi/notes/NoteListActivity;->listNote:Landroid/widget/ListView;

    invoke-virtual {v1, v3}, Landroid/widget/ListView;->setDividerHeight(I)V

    .line 384
    iget-object v1, p0, Lcom/xiaomi/notes/NoteListActivity;->listNote:Landroid/widget/ListView;

    invoke-virtual {v1, v3}, Landroid/widget/ListView;->setItemsCanFocus(Z)V

    .line 385
    iget-object v1, p0, Lcom/xiaomi/notes/NoteListActivity;->listNote:Landroid/widget/ListView;

    invoke-virtual {v1, v0}, Landroid/widget/ListView;->setAdapter(Landroid/widget/ListAdapter;)V

    .line 387
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteListActivity;->initConfig()V

    .line 390
    new-instance v1, Lcom/xiaomi/notes/NoteListActivity$1;

    invoke-direct {v1, p0}, Lcom/xiaomi/notes/NoteListActivity$1;-><init>(Lcom/xiaomi/notes/NoteListActivity;)V

    new-array v2, v3, [Ljava/lang/Void;

    invoke-virtual {v1, v2}, Lcom/xiaomi/notes/NoteListActivity$1;->execute([Ljava/lang/Object;)Landroid/os/AsyncTask;

    .line 400
    return-void

    .line 379
    :cond_0
    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Lcom/xiaomi/notes/AdapterNoteItem;->setOrientation(I)V

    goto :goto_0
.end method

.method private initConfig()V
    .locals 10

    .prologue
    const/4 v9, 0x5

    const/4 v8, 0x3

    const/4 v7, 0x0

    .line 652
    const/4 v0, 0x0

    .line 654
    .local v0, save:Z
    invoke-static {p0}, Lcom/xiaomi/notes/Tools;->getConfigData(Landroid/app/Activity;)[Ljava/lang/Object;

    move-result-object v4

    iput-object v4, p0, Lcom/xiaomi/notes/NoteListActivity;->objConfig:[Ljava/lang/Object;

    .line 657
    iget-object v4, p0, Lcom/xiaomi/notes/NoteListActivity;->objConfig:[Ljava/lang/Object;

    aget-object v4, v4, v7

    check-cast v4, Ljava/lang/Long;

    invoke-virtual {v4}, Ljava/lang/Long;->longValue()J

    move-result-wide v1

    .line 658
    .local v1, usetime:J
    const-wide/16 v4, 0x0

    cmp-long v4, v1, v4

    if-nez v4, :cond_0

    .line 659
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteListActivity;->defineBaseData()V

    .line 660
    iget-object v4, p0, Lcom/xiaomi/notes/NoteListActivity;->objConfig:[Ljava/lang/Object;

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v5

    invoke-static {v5, v6}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v5

    aput-object v5, v4, v7

    .line 661
    const/4 v0, 0x1

    .line 664
    :cond_0
    iget-object v4, p0, Lcom/xiaomi/notes/NoteListActivity;->objConfig:[Ljava/lang/Object;

    aget-object v4, v4, v9

    check-cast v4, Ljava/lang/Integer;

    invoke-virtual {v4}, Ljava/lang/Integer;->intValue()I

    move-result v3

    .line 665
    .local v3, ver_db:I
    if-eq v3, v8, :cond_1

    .line 666
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteListActivity;->defineBaseData()V

    .line 667
    iget-object v4, p0, Lcom/xiaomi/notes/NoteListActivity;->objConfig:[Ljava/lang/Object;

    invoke-static {v8}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v5

    aput-object v5, v4, v9

    .line 668
    const/4 v0, 0x1

    .line 670
    :cond_1
    if-eqz v0, :cond_2

    .line 671
    iget-object v4, p0, Lcom/xiaomi/notes/NoteListActivity;->objConfig:[Ljava/lang/Object;

    invoke-static {p0, v4}, Lcom/xiaomi/notes/Tools;->setConfigData(Landroid/app/Activity;[Ljava/lang/Object;)V

    .line 673
    :cond_2
    return-void
.end method

.method private initListener()V
    .locals 2

    .prologue
    .line 403
    iget-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->listNote:Landroid/widget/ListView;

    new-instance v1, Lcom/xiaomi/notes/NoteListActivity$2;

    invoke-direct {v1, p0}, Lcom/xiaomi/notes/NoteListActivity$2;-><init>(Lcom/xiaomi/notes/NoteListActivity;)V

    invoke-virtual {v0, v1}, Landroid/widget/ListView;->setOnItemClickListener(Landroid/widget/AdapterView$OnItemClickListener;)V

    .line 426
    iget-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->listNote:Landroid/widget/ListView;

    new-instance v1, Lcom/xiaomi/notes/NoteListActivity$3;

    invoke-direct {v1, p0}, Lcom/xiaomi/notes/NoteListActivity$3;-><init>(Lcom/xiaomi/notes/NoteListActivity;)V

    invoke-virtual {v0, v1}, Landroid/widget/ListView;->setOnItemLongClickListener(Landroid/widget/AdapterView$OnItemLongClickListener;)V

    .line 479
    iget-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->listNote:Landroid/widget/ListView;

    new-instance v1, Lcom/xiaomi/notes/NoteListActivity$4;

    invoke-direct {v1, p0}, Lcom/xiaomi/notes/NoteListActivity$4;-><init>(Lcom/xiaomi/notes/NoteListActivity;)V

    invoke-virtual {v0, v1}, Landroid/widget/ListView;->setOnTouchListener(Landroid/view/View$OnTouchListener;)V

    .line 535
    iget-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->btnAdd:Landroid/widget/ImageButton;

    new-instance v1, Lcom/xiaomi/notes/NoteListActivity$5;

    invoke-direct {v1, p0}, Lcom/xiaomi/notes/NoteListActivity$5;-><init>(Lcom/xiaomi/notes/NoteListActivity;)V

    invoke-virtual {v0, v1}, Landroid/widget/ImageButton;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 554
    iget-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->btnEditOk:Landroid/widget/Button;

    new-instance v1, Lcom/xiaomi/notes/NoteListActivity$6;

    invoke-direct {v1, p0}, Lcom/xiaomi/notes/NoteListActivity$6;-><init>(Lcom/xiaomi/notes/NoteListActivity;)V

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 610
    iget-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->btnEditBack:Landroid/widget/Button;

    new-instance v1, Lcom/xiaomi/notes/NoteListActivity$7;

    invoke-direct {v1, p0}, Lcom/xiaomi/notes/NoteListActivity$7;-><init>(Lcom/xiaomi/notes/NoteListActivity;)V

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 618
    iget-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->btnFolderOk:Landroid/widget/Button;

    new-instance v1, Lcom/xiaomi/notes/NoteListActivity$8;

    invoke-direct {v1, p0}, Lcom/xiaomi/notes/NoteListActivity$8;-><init>(Lcom/xiaomi/notes/NoteListActivity;)V

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 638
    iget-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->btnFolderBack:Landroid/widget/Button;

    new-instance v1, Lcom/xiaomi/notes/NoteListActivity$9;

    invoke-direct {v1, p0}, Lcom/xiaomi/notes/NoteListActivity$9;-><init>(Lcom/xiaomi/notes/NoteListActivity;)V

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 646
    return-void
.end method

.method public static isFolder(I)Z
    .locals 1
    .parameter "id"

    .prologue
    .line 1189
    if-gez p0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method private jump()V
    .locals 9

    .prologue
    const/4 v8, 0x0

    const/4 v7, -0x1

    .line 691
    invoke-virtual {p0}, Lcom/xiaomi/notes/NoteListActivity;->getIntent()Landroid/content/Intent;

    move-result-object v5

    const-string v6, "DESKTOP_TO_APP_FLAG_ID"

    invoke-virtual {v5, v6, v7}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result v1

    .line 692
    .local v1, id:I
    invoke-virtual {p0}, Lcom/xiaomi/notes/NoteListActivity;->getIntent()Landroid/content/Intent;

    move-result-object v5

    const-string v6, "DESKTOP_TO_APP_FLAG_TYPE"

    invoke-virtual {v5, v6, v7}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result v4

    .line 693
    .local v4, type:I
    invoke-virtual {p0}, Lcom/xiaomi/notes/NoteListActivity;->getIntent()Landroid/content/Intent;

    move-result-object v5

    const-string v6, "DESKTOP_TO_APP_FLAG_EXPAND"

    invoke-virtual {v5, v6, v7}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result v0

    .line 695
    .local v0, expand:I
    packed-switch v4, :pswitch_data_0

    .line 722
    invoke-virtual {p0, v8}, Lcom/xiaomi/notes/NoteListActivity;->setState(I)V

    .line 724
    new-instance v5, Lcom/xiaomi/notes/update/NotesRefreshScheduler;

    invoke-direct {v5, p0}, Lcom/xiaomi/notes/update/NotesRefreshScheduler;-><init>(Landroid/content/Context;)V

    invoke-virtual {v5, v8, v8}, Lcom/xiaomi/notes/update/NotesRefreshScheduler;->refresh(II)V

    .line 729
    :cond_0
    :goto_0
    return-void

    .line 697
    :pswitch_0
    invoke-virtual {p0, v1}, Lcom/xiaomi/notes/NoteListActivity;->getFolderName(I)Ljava/lang/String;

    move-result-object v3

    .line 698
    .local v3, name:Ljava/lang/String;
    if-eqz v3, :cond_0

    .line 700
    iput v1, p0, Lcom/xiaomi/notes/NoteListActivity;->nFolderId:I

    .line 701
    const/4 v5, 0x3

    invoke-virtual {p0, v5}, Lcom/xiaomi/notes/NoteListActivity;->setState(I)V

    goto :goto_0

    .line 706
    .end local v3           #name:Ljava/lang/String;
    :pswitch_1
    iget-object v5, p0, Lcom/xiaomi/notes/NoteListActivity;->db:Lcom/xiaomi/notes/DBOperate;

    invoke-virtual {v5, v1}, Lcom/xiaomi/notes/DBOperate;->getNote(I)Ljava/util/Map;

    move-result-object v2

    .line 707
    .local v2, info:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    if-eqz v2, :cond_0

    .line 709
    int-to-long v5, v1

    invoke-direct {p0, v5, v6}, Lcom/xiaomi/notes/NoteListActivity;->gotoEditNote(J)V

    goto :goto_0

    .line 714
    .end local v2           #info:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    :pswitch_2
    iget-object v5, p0, Lcom/xiaomi/notes/NoteListActivity;->db:Lcom/xiaomi/notes/DBOperate;

    invoke-virtual {v5, v0, v1}, Lcom/xiaomi/notes/DBOperate;->getWidget(II)Ljava/util/Map;

    move-result-object v2

    .line 715
    .restart local v2       #info:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    if-eqz v2, :cond_0

    .line 717
    const-string v5, "_id"

    invoke-interface {v2, v5}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Ljava/lang/Integer;

    invoke-virtual {v5}, Ljava/lang/Integer;->intValue()I

    move-result v5

    int-to-long v5, v5

    invoke-direct {p0, v5, v6}, Lcom/xiaomi/notes/NoteListActivity;->gotoEditNote(J)V

    goto :goto_0

    .line 695
    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_1
        :pswitch_0
        :pswitch_2
    .end packed-switch
.end method

.method private restoreXML2DB()V
    .locals 2

    .prologue
    const/4 v1, 0x0

    .line 1082
    invoke-static {}, Lcom/xiaomi/notes/ShareData;->isCanRestore()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 1083
    iget-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->db:Lcom/xiaomi/notes/DBOperate;

    invoke-virtual {v0, v1}, Lcom/xiaomi/notes/DBOperate;->deleteNote(I)V

    .line 1084
    iget-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->db:Lcom/xiaomi/notes/DBOperate;

    invoke-virtual {v0, v1}, Lcom/xiaomi/notes/DBOperate;->deleteFolder(I)V

    .line 1086
    :cond_0
    sget-object v0, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    iget-object v1, p0, Lcom/xiaomi/notes/NoteListActivity;->db:Lcom/xiaomi/notes/DBOperate;

    invoke-static {v0, v1}, Lcom/xiaomi/notes/ShareData;->callRestoreXml(Landroid/content/Context;Lcom/xiaomi/notes/DBOperate;)V

    .line 1087
    invoke-virtual {p0}, Lcom/xiaomi/notes/NoteListActivity;->synDB()V

    .line 1088
    return-void
.end method

.method private restoreXML2DBDialog()V
    .locals 4

    .prologue
    const/4 v3, 0x0

    .line 1068
    new-instance v0, Landroid/app/AlertDialog$Builder;

    sget-object v1, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    invoke-direct {v0, v1}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    .line 1069
    .local v0, alert:Landroid/app/AlertDialog$Builder;
    invoke-virtual {v0, v3}, Landroid/app/AlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

    .line 1070
    const v1, 0x7f05002b

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setMessage(I)Landroid/app/AlertDialog$Builder;

    .line 1071
    const v1, 0x7f050066

    new-instance v2, Lcom/xiaomi/notes/NoteListActivity$18;

    invoke-direct {v2, p0}, Lcom/xiaomi/notes/NoteListActivity$18;-><init>(Lcom/xiaomi/notes/NoteListActivity;)V

    invoke-virtual {v0, v1, v2}, Landroid/app/AlertDialog$Builder;->setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    .line 1077
    const v1, 0x7f050067

    invoke-virtual {v0, v1, v3}, Landroid/app/AlertDialog$Builder;->setNegativeButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    .line 1078
    invoke-virtual {v0}, Landroid/app/AlertDialog$Builder;->show()Landroid/app/AlertDialog;

    .line 1079
    return-void
.end method

.method private setVisableEditDialog(Z)V
    .locals 2
    .parameter "visable"

    .prologue
    .line 821
    if-eqz p1, :cond_0

    .line 822
    iget-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->layoutEdit:Landroid/widget/LinearLayout;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setVisibility(I)V

    .line 826
    :goto_0
    return-void

    .line 824
    :cond_0
    iget-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->layoutEdit:Landroid/widget/LinearLayout;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setVisibility(I)V

    goto :goto_0
.end method

.method private setVisableFolderDialog(Z)V
    .locals 2
    .parameter "visable"

    .prologue
    .line 829
    if-eqz p1, :cond_0

    .line 830
    iget-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->layoutFolder:Landroid/widget/LinearLayout;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setVisibility(I)V

    .line 834
    :goto_0
    return-void

    .line 832
    :cond_0
    iget-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->layoutFolder:Landroid/widget/LinearLayout;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setVisibility(I)V

    goto :goto_0
.end method

.method private shareFolderToDesktop(I)V
    .locals 6
    .parameter "id"

    .prologue
    const/16 v3, 0xa

    const/4 v5, 0x0

    .line 1146
    iget-object v2, p0, Lcom/xiaomi/notes/NoteListActivity;->txtTitle:Landroid/widget/TextView;

    invoke-virtual {v2}, Landroid/widget/TextView;->getText()Ljava/lang/CharSequence;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/String;->length()I

    move-result v0

    .line 1147
    .local v0, lng:I
    if-lez v0, :cond_0

    .line 1149
    if-le v0, v3, :cond_1

    .line 1150
    iget-object v2, p0, Lcom/xiaomi/notes/NoteListActivity;->txtTitle:Landroid/widget/TextView;

    invoke-virtual {v2}, Landroid/widget/TextView;->getText()Ljava/lang/CharSequence;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v2, v5, v3}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v1

    .line 1155
    .local v1, title:Ljava/lang/String;
    :goto_0
    sget-object v2, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    const/4 v3, 0x2

    const v4, 0x7f02001f

    invoke-static {v2, v1, v3, p1, v4}, Lcom/xiaomi/notes/ShareToApp;->sendToDesktop(Landroid/content/Context;Ljava/lang/String;III)V

    .line 1157
    sget-object v2, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    const v3, 0x7f050057

    invoke-static {v2, v3, v5}, Landroid/widget/Toast;->makeText(Landroid/content/Context;II)Landroid/widget/Toast;

    move-result-object v2

    invoke-virtual {v2}, Landroid/widget/Toast;->show()V

    .line 1159
    .end local v1           #title:Ljava/lang/String;
    :cond_0
    return-void

    .line 1152
    :cond_1
    iget-object v2, p0, Lcom/xiaomi/notes/NoteListActivity;->txtTitle:Landroid/widget/TextView;

    invoke-virtual {v2}, Landroid/widget/TextView;->getText()Ljava/lang/CharSequence;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v1

    .restart local v1       #title:Ljava/lang/String;
    goto :goto_0
.end method

.method private showDeleteDialog()V
    .locals 3

    .prologue
    .line 997
    new-instance v0, Landroid/app/AlertDialog$Builder;

    sget-object v1, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    invoke-direct {v0, v1}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    .line 998
    .local v0, alert:Landroid/app/AlertDialog$Builder;
    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

    .line 999
    const v1, 0x7f050064

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setMessage(I)Landroid/app/AlertDialog$Builder;

    .line 1000
    const v1, 0x7f050066

    new-instance v2, Lcom/xiaomi/notes/NoteListActivity$16;

    invoke-direct {v2, p0}, Lcom/xiaomi/notes/NoteListActivity$16;-><init>(Lcom/xiaomi/notes/NoteListActivity;)V

    invoke-virtual {v0, v1, v2}, Landroid/app/AlertDialog$Builder;->setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    .line 1007
    const v1, 0x7f050067

    new-instance v2, Lcom/xiaomi/notes/NoteListActivity$17;

    invoke-direct {v2, p0}, Lcom/xiaomi/notes/NoteListActivity$17;-><init>(Lcom/xiaomi/notes/NoteListActivity;)V

    invoke-virtual {v0, v1, v2}, Landroid/app/AlertDialog$Builder;->setNegativeButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    .line 1012
    invoke-virtual {v0}, Landroid/app/AlertDialog$Builder;->show()Landroid/app/AlertDialog;

    .line 1013
    return-void
.end method

.method private showInputPasswordDialog()V
    .locals 6

    .prologue
    const/4 v5, 0x4

    .line 854
    iget-object v4, p0, Lcom/xiaomi/notes/NoteListActivity;->btnAdd:Landroid/widget/ImageButton;

    invoke-virtual {v4, v5}, Landroid/widget/ImageButton;->setVisibility(I)V

    .line 855
    iget-object v4, p0, Lcom/xiaomi/notes/NoteListActivity;->listNote:Landroid/widget/ListView;

    invoke-virtual {v4, v5}, Landroid/widget/ListView;->setVisibility(I)V

    .line 858
    sget-object v4, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    const-string v5, "layout_inflater"

    invoke-virtual {v4, v5}, Lcom/xiaomi/notes/NoteListActivity;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Landroid/view/LayoutInflater;

    .line 860
    .local v2, objInflater:Landroid/view/LayoutInflater;
    const v4, 0x7f03000c

    const/4 v5, 0x0

    invoke-virtual {v2, v4, v5}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v1

    .line 861
    .local v1, main:Landroid/view/View;
    const v4, 0x7f070047

    invoke-virtual {v1, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/EditText;

    .line 862
    .local v3, text:Landroid/widget/EditText;
    new-instance v0, Landroid/app/AlertDialog$Builder;

    sget-object v4, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    invoke-direct {v0, v4}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    .line 864
    .local v0, dialog:Landroid/app/AlertDialog$Builder;
    const v4, 0x7f050040

    invoke-virtual {v0, v4}, Landroid/app/AlertDialog$Builder;->setTitle(I)Landroid/app/AlertDialog$Builder;

    .line 865
    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setView(Landroid/view/View;)Landroid/app/AlertDialog$Builder;

    .line 866
    const v4, 0x7f050046

    new-instance v5, Lcom/xiaomi/notes/NoteListActivity$10;

    invoke-direct {v5, p0, v3}, Lcom/xiaomi/notes/NoteListActivity$10;-><init>(Lcom/xiaomi/notes/NoteListActivity;Landroid/widget/EditText;)V

    invoke-virtual {v0, v4, v5}, Landroid/app/AlertDialog$Builder;->setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    .line 889
    new-instance v4, Lcom/xiaomi/notes/NoteListActivity$11;

    invoke-direct {v4, p0}, Lcom/xiaomi/notes/NoteListActivity$11;-><init>(Lcom/xiaomi/notes/NoteListActivity;)V

    invoke-virtual {v0, v4}, Landroid/app/AlertDialog$Builder;->setOnCancelListener(Landroid/content/DialogInterface$OnCancelListener;)Landroid/app/AlertDialog$Builder;

    .line 895
    invoke-virtual {v0}, Landroid/app/AlertDialog$Builder;->show()Landroid/app/AlertDialog;

    .line 896
    return-void
.end method

.method private showPasswordErrorDialog()V
    .locals 3

    .prologue
    const/4 v2, 0x4

    .line 900
    iget-object v1, p0, Lcom/xiaomi/notes/NoteListActivity;->btnAdd:Landroid/widget/ImageButton;

    invoke-virtual {v1, v2}, Landroid/widget/ImageButton;->setVisibility(I)V

    .line 901
    iget-object v1, p0, Lcom/xiaomi/notes/NoteListActivity;->listNote:Landroid/widget/ListView;

    invoke-virtual {v1, v2}, Landroid/widget/ListView;->setVisibility(I)V

    .line 904
    new-instance v0, Landroid/app/AlertDialog$Builder;

    sget-object v1, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    invoke-direct {v0, v1}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    .line 905
    .local v0, exit:Landroid/app/AlertDialog$Builder;
    const v1, 0x7f050040

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setTitle(I)Landroid/app/AlertDialog$Builder;

    .line 906
    const v1, 0x7f050049

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setMessage(I)Landroid/app/AlertDialog$Builder;

    .line 907
    const v1, 0x7f050046

    new-instance v2, Lcom/xiaomi/notes/NoteListActivity$12;

    invoke-direct {v2, p0}, Lcom/xiaomi/notes/NoteListActivity$12;-><init>(Lcom/xiaomi/notes/NoteListActivity;)V

    invoke-virtual {v0, v1, v2}, Landroid/app/AlertDialog$Builder;->setNegativeButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    .line 913
    new-instance v1, Lcom/xiaomi/notes/NoteListActivity$13;

    invoke-direct {v1, p0}, Lcom/xiaomi/notes/NoteListActivity$13;-><init>(Lcom/xiaomi/notes/NoteListActivity;)V

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setOnCancelListener(Landroid/content/DialogInterface$OnCancelListener;)Landroid/app/AlertDialog$Builder;

    .line 919
    invoke-virtual {v0}, Landroid/app/AlertDialog$Builder;->show()Landroid/app/AlertDialog;

    .line 920
    return-void
.end method

.method private showSettingPassword()V
    .locals 5

    .prologue
    const/4 v3, 0x2

    .line 923
    iget-object v2, p0, Lcom/xiaomi/notes/NoteListActivity;->objConfig:[Ljava/lang/Object;

    aget-object v2, v2, v3

    check-cast v2, Ljava/lang/String;

    invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    if-eqz v2, :cond_0

    .line 924
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteListActivity;->showSettingPasswordDialog()V

    .line 951
    :goto_0
    return-void

    .line 928
    :cond_0
    new-instance v0, Landroid/app/AlertDialog$Builder;

    sget-object v2, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    invoke-direct {v0, v2}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    .line 930
    .local v0, dialog:Landroid/app/AlertDialog$Builder;
    new-array v1, v3, [Ljava/lang/String;

    const/4 v2, 0x0

    sget-object v3, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    invoke-virtual {v3}, Lcom/xiaomi/notes/NoteListActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    const v4, 0x7f050042

    invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    aput-object v3, v1, v2

    const/4 v2, 0x1

    sget-object v3, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    invoke-virtual {v3}, Lcom/xiaomi/notes/NoteListActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    const v4, 0x7f050043

    invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    aput-object v3, v1, v2

    .line 934
    .local v1, items:[Ljava/lang/String;
    new-instance v2, Lcom/xiaomi/notes/NoteListActivity$14;

    invoke-direct {v2, p0}, Lcom/xiaomi/notes/NoteListActivity$14;-><init>(Lcom/xiaomi/notes/NoteListActivity;)V

    invoke-virtual {v0, v1, v2}, Landroid/app/AlertDialog$Builder;->setItems([Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    .line 950
    invoke-virtual {v0}, Landroid/app/AlertDialog$Builder;->show()Landroid/app/AlertDialog;

    goto :goto_0
.end method

.method private showSettingPasswordDialog()V
    .locals 11

    .prologue
    const/4 v10, 0x0

    const/4 v9, 0x0

    .line 954
    sget-object v7, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    const-string v8, "layout_inflater"

    invoke-virtual {v7, v8}, Lcom/xiaomi/notes/NoteListActivity;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Landroid/view/LayoutInflater;

    .line 956
    .local v4, objInflater:Landroid/view/LayoutInflater;
    const v7, 0x7f03000c

    invoke-virtual {v4, v7, v10}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v3

    .line 957
    .local v3, main:Landroid/view/View;
    const v7, 0x7f070047

    invoke-virtual {v3, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v5

    check-cast v5, Landroid/widget/EditText;

    .line 958
    .local v5, text:Landroid/widget/EditText;
    const v7, 0x7f070049

    invoke-virtual {v3, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v6

    check-cast v6, Landroid/widget/EditText;

    .line 959
    .local v6, textRepeat:Landroid/widget/EditText;
    const v7, 0x7f070046

    invoke-virtual {v3, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    .line 960
    .local v2, lblText:Landroid/view/View;
    const v7, 0x7f070048

    invoke-virtual {v3, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    .line 962
    .local v1, lblRepeat:Landroid/view/View;
    invoke-virtual {v2, v9}, Landroid/view/View;->setVisibility(I)V

    .line 963
    invoke-virtual {v6, v9}, Landroid/widget/EditText;->setVisibility(I)V

    .line 964
    invoke-virtual {v1, v9}, Landroid/view/View;->setVisibility(I)V

    .line 966
    new-instance v0, Landroid/app/AlertDialog$Builder;

    sget-object v7, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    invoke-direct {v0, v7}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    .line 968
    .local v0, dialog:Landroid/app/AlertDialog$Builder;
    iget-object v7, p0, Lcom/xiaomi/notes/NoteListActivity;->objConfig:[Ljava/lang/Object;

    const/4 v8, 0x2

    aget-object v7, v7, v8

    check-cast v7, Ljava/lang/String;

    invoke-static {v7}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v7

    if-eqz v7, :cond_0

    .line 969
    const v7, 0x7f050041

    invoke-virtual {v0, v7}, Landroid/app/AlertDialog$Builder;->setTitle(I)Landroid/app/AlertDialog$Builder;

    .line 974
    :goto_0
    invoke-virtual {v0, v3}, Landroid/app/AlertDialog$Builder;->setView(Landroid/view/View;)Landroid/app/AlertDialog$Builder;

    .line 975
    const v7, 0x7f050046

    new-instance v8, Lcom/xiaomi/notes/NoteListActivity$15;

    invoke-direct {v8, p0, v5, v6}, Lcom/xiaomi/notes/NoteListActivity$15;-><init>(Lcom/xiaomi/notes/NoteListActivity;Landroid/widget/EditText;Landroid/widget/EditText;)V

    invoke-virtual {v0, v7, v8}, Landroid/app/AlertDialog$Builder;->setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    .line 992
    const v7, 0x7f050047

    invoke-virtual {v0, v7, v10}, Landroid/app/AlertDialog$Builder;->setNegativeButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    .line 993
    invoke-virtual {v0}, Landroid/app/AlertDialog$Builder;->show()Landroid/app/AlertDialog;

    .line 994
    return-void

    .line 971
    :cond_0
    const v7, 0x7f050042

    invoke-virtual {v0, v7}, Landroid/app/AlertDialog$Builder;->setTitle(I)Landroid/app/AlertDialog$Builder;

    goto :goto_0
.end method

.method private showSoftKey()V
    .locals 3

    .prologue
    .line 837
    sget-object v1, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    const-string v2, "input_method"

    invoke-virtual {v1, v2}, Lcom/xiaomi/notes/NoteListActivity;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/view/inputmethod/InputMethodManager;

    .line 839
    .local v0, im:Landroid/view/inputmethod/InputMethodManager;
    if-eqz v0, :cond_0

    .line 840
    const/4 v1, 0x0

    const/4 v2, 0x2

    invoke-virtual {v0, v1, v2}, Landroid/view/inputmethod/InputMethodManager;->toggleSoftInput(II)V

    .line 842
    :cond_0
    return-void
.end method


# virtual methods
.method public getFolderName(I)Ljava/lang/String;
    .locals 3
    .parameter "id"

    .prologue
    .line 1179
    iget-object v2, p0, Lcom/xiaomi/notes/NoteListActivity;->db:Lcom/xiaomi/notes/DBOperate;

    invoke-virtual {v2, p1}, Lcom/xiaomi/notes/DBOperate;->getFolder(I)Ljava/util/List;

    move-result-object v0

    .line 1181
    .local v0, info:Ljava/util/List;,"Ljava/util/List<Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;>;"
    if-eqz v0, :cond_0

    .line 1182
    const/4 v2, 0x0

    invoke-interface {v0, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/util/Map;

    .line 1183
    .local v1, ret:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    const-string v2, "foldername"

    invoke-interface {v1, v2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object p0

    .end local p0
    check-cast p0, Ljava/lang/String;

    move-object v2, p0

    .line 1185
    .end local v1           #ret:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    :goto_0
    return-object v2

    .restart local p0
    :cond_0
    const/4 v2, 0x0

    goto :goto_0
.end method

.method public onCreate(Landroid/os/Bundle;)V
    .locals 2
    .parameter "savedInstanceState"

    .prologue
    .line 153
    invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

    .line 155
    const v0, 0x7f030008

    invoke-virtual {p0, v0}, Lcom/xiaomi/notes/NoteListActivity;->setContentView(I)V

    .line 157
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteListActivity;->init()V

    .line 158
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteListActivity;->initListener()V

    .line 159
    sget-object v0, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    invoke-virtual {v0}, Lcom/xiaomi/notes/NoteListActivity;->getWindow()Landroid/view/Window;

    move-result-object v0

    const/16 v1, 0x10

    invoke-virtual {v0, v1}, Landroid/view/Window;->setSoftInputMode(I)V

    .line 161
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteListActivity;->checkPassword()V

    .line 162
    sget-boolean v0, Lcom/xiaomi/notes/NoteListActivity;->blnLogin:Z

    if-eqz v0, :cond_0

    .line 163
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteListActivity;->jump()V

    .line 165
    :cond_0
    return-void
.end method

.method protected onDestroy()V
    .locals 1

    .prologue
    .line 194
    invoke-super {p0}, Landroid/app/Activity;->onDestroy()V

    .line 196
    iget-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->db:Lcom/xiaomi/notes/DBOperate;

    if-eqz v0, :cond_0

    .line 197
    iget-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->db:Lcom/xiaomi/notes/DBOperate;

    invoke-virtual {v0}, Lcom/xiaomi/notes/DBOperate;->close()V

    .line 199
    :cond_0
    return-void
.end method

.method public onKeyDown(ILandroid/view/KeyEvent;)Z
    .locals 1
    .parameter "keyCode"
    .parameter "event"

    .prologue
    .line 323
    const/4 v0, 0x4

    if-ne p1, v0, :cond_0

    .line 324
    iget v0, p0, Lcom/xiaomi/notes/NoteListActivity;->nState:I

    packed-switch v0, :pswitch_data_0

    .line 335
    :goto_0
    const/4 v0, 0x1

    .line 337
    :goto_1
    return v0

    .line 326
    :pswitch_0
    sget-object v0, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    invoke-virtual {v0}, Lcom/xiaomi/notes/NoteListActivity;->finish()V

    goto :goto_0

    .line 332
    :pswitch_1
    const/4 v0, 0x0

    invoke-virtual {p0, v0}, Lcom/xiaomi/notes/NoteListActivity;->setState(I)V

    goto :goto_0

    .line 337
    :cond_0
    invoke-super {p0, p1, p2}, Landroid/app/Activity;->onKeyDown(ILandroid/view/KeyEvent;)Z

    move-result v0

    goto :goto_1

    .line 324
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
        :pswitch_1
        :pswitch_1
        :pswitch_1
    .end packed-switch
.end method

.method protected onNewIntent(Landroid/content/Intent;)V
    .locals 1
    .parameter "intent"

    .prologue
    .line 175
    invoke-super {p0, p1}, Landroid/app/Activity;->onNewIntent(Landroid/content/Intent;)V

    .line 176
    invoke-virtual {p0, p1}, Lcom/xiaomi/notes/NoteListActivity;->setIntent(Landroid/content/Intent;)V

    .line 178
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteListActivity;->checkPassword()V

    .line 179
    sget-boolean v0, Lcom/xiaomi/notes/NoteListActivity;->blnLogin:Z

    if-eqz v0, :cond_0

    .line 180
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteListActivity;->jump()V

    .line 182
    :cond_0
    return-void
.end method

.method public onOptionsItemSelected(Landroid/view/MenuItem;)Z
    .locals 8
    .parameter "item"

    .prologue
    const v7, 0x7f050015

    const/4 v3, 0x4

    const/4 v6, 0x2

    const/4 v5, 0x1

    const/4 v4, 0x0

    .line 228
    invoke-interface {p1}, Landroid/view/MenuItem;->getItemId()I

    move-result v1

    .line 229
    .local v1, id:I
    packed-switch v1, :pswitch_data_0

    .line 317
    :goto_0
    return v5

    .line 231
    :pswitch_0
    const-wide/16 v2, -0x1

    invoke-direct {p0, v2, v3}, Lcom/xiaomi/notes/NoteListActivity;->gotoEditNote(J)V

    goto :goto_0

    .line 235
    :pswitch_1
    iget v2, p0, Lcom/xiaomi/notes/NoteListActivity;->nState:I

    packed-switch v2, :pswitch_data_1

    :pswitch_2
    goto :goto_0

    .line 237
    :pswitch_3
    invoke-virtual {p0, v6}, Lcom/xiaomi/notes/NoteListActivity;->setState(I)V

    goto :goto_0

    .line 240
    :pswitch_4
    iget-object v2, p0, Lcom/xiaomi/notes/NoteListActivity;->edtFolderName:Landroid/widget/EditText;

    iget v3, p0, Lcom/xiaomi/notes/NoteListActivity;->nFolderId:I

    invoke-virtual {p0, v3}, Lcom/xiaomi/notes/NoteListActivity;->getFolderName(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 241
    invoke-virtual {p0, v6}, Lcom/xiaomi/notes/NoteListActivity;->setState(I)V

    goto :goto_0

    .line 247
    :pswitch_5
    iget v2, p0, Lcom/xiaomi/notes/NoteListActivity;->nState:I

    packed-switch v2, :pswitch_data_2

    :pswitch_6
    goto :goto_0

    .line 249
    :pswitch_7
    iget-object v2, p0, Lcom/xiaomi/notes/NoteListActivity;->listNote:Landroid/widget/ListView;

    invoke-virtual {v2}, Landroid/widget/ListView;->getAdapter()Landroid/widget/ListAdapter;

    move-result-object v0

    check-cast v0, Lcom/xiaomi/notes/AdapterNoteItem;

    .line 250
    .local v0, adapter:Lcom/xiaomi/notes/AdapterNoteItem;
    invoke-virtual {v0}, Lcom/xiaomi/notes/AdapterNoteItem;->getFolderInfo()Ljava/util/List;

    move-result-object v2

    if-eqz v2, :cond_0

    invoke-virtual {v0}, Lcom/xiaomi/notes/AdapterNoteItem;->getNoteInfo()Ljava/util/List;

    move-result-object v2

    if-eqz v2, :cond_0

    invoke-virtual {v0}, Lcom/xiaomi/notes/AdapterNoteItem;->getFolderInfo()Ljava/util/List;

    move-result-object v2

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    if-lez v2, :cond_0

    invoke-virtual {v0}, Lcom/xiaomi/notes/AdapterNoteItem;->getNoteInfo()Ljava/util/List;

    move-result-object v2

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    if-lez v2, :cond_0

    .line 253
    invoke-virtual {p0, v3}, Lcom/xiaomi/notes/NoteListActivity;->setState(I)V

    goto :goto_0

    .line 255
    :cond_0
    sget-object v2, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    invoke-static {v2, v7, v4}, Landroid/widget/Toast;->makeText(Landroid/content/Context;II)Landroid/widget/Toast;

    move-result-object v2

    invoke-virtual {v2}, Landroid/widget/Toast;->show()V

    goto :goto_0

    .line 261
    .end local v0           #adapter:Lcom/xiaomi/notes/AdapterNoteItem;
    :pswitch_8
    iget-object v2, p0, Lcom/xiaomi/notes/NoteListActivity;->listNote:Landroid/widget/ListView;

    invoke-virtual {v2}, Landroid/widget/ListView;->getAdapter()Landroid/widget/ListAdapter;

    move-result-object v0

    check-cast v0, Lcom/xiaomi/notes/AdapterNoteItem;

    .line 262
    .restart local v0       #adapter:Lcom/xiaomi/notes/AdapterNoteItem;
    invoke-virtual {v0}, Lcom/xiaomi/notes/AdapterNoteItem;->getNoteInfo()Ljava/util/List;

    move-result-object v2

    if-eqz v2, :cond_1

    invoke-virtual {v0}, Lcom/xiaomi/notes/AdapterNoteItem;->getNoteInfo()Ljava/util/List;

    move-result-object v2

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    if-lez v2, :cond_1

    .line 263
    invoke-virtual {p0, v3}, Lcom/xiaomi/notes/NoteListActivity;->setState(I)V

    goto :goto_0

    .line 265
    :cond_1
    sget-object v2, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    invoke-static {v2, v7, v4}, Landroid/widget/Toast;->makeText(Landroid/content/Context;II)Landroid/widget/Toast;

    move-result-object v2

    invoke-virtual {v2}, Landroid/widget/Toast;->show()V

    goto/16 :goto_0

    .line 274
    .end local v0           #adapter:Lcom/xiaomi/notes/AdapterNoteItem;
    :pswitch_9
    iget-object v2, p0, Lcom/xiaomi/notes/NoteListActivity;->listNote:Landroid/widget/ListView;

    invoke-virtual {v2}, Landroid/widget/ListView;->getAdapter()Landroid/widget/ListAdapter;

    move-result-object v0

    check-cast v0, Lcom/xiaomi/notes/AdapterNoteItem;

    .line 275
    .restart local v0       #adapter:Lcom/xiaomi/notes/AdapterNoteItem;
    invoke-virtual {v0}, Lcom/xiaomi/notes/AdapterNoteItem;->getCount()I

    move-result v2

    if-lez v2, :cond_2

    .line 276
    invoke-virtual {p0, v5}, Lcom/xiaomi/notes/NoteListActivity;->setState(I)V

    goto/16 :goto_0

    .line 278
    :cond_2
    sget-object v2, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    const v3, 0x7f050014

    invoke-static {v2, v3, v4}, Landroid/widget/Toast;->makeText(Landroid/content/Context;II)Landroid/widget/Toast;

    move-result-object v2

    invoke-virtual {v2}, Landroid/widget/Toast;->show()V

    goto/16 :goto_0

    .line 284
    .end local v0           #adapter:Lcom/xiaomi/notes/AdapterNoteItem;
    :pswitch_a
    iget v2, p0, Lcom/xiaomi/notes/NoteListActivity;->nFolderId:I

    invoke-direct {p0, v2}, Lcom/xiaomi/notes/NoteListActivity;->shareFolderToDesktop(I)V

    goto/16 :goto_0

    .line 288
    :pswitch_b
    invoke-direct {p0, v4}, Lcom/xiaomi/notes/NoteListActivity;->callDialogToSend(I)V

    goto/16 :goto_0

    .line 292
    :pswitch_c
    iget-object v2, p0, Lcom/xiaomi/notes/NoteListActivity;->listNote:Landroid/widget/ListView;

    invoke-virtual {v2}, Landroid/widget/ListView;->getAdapter()Landroid/widget/ListAdapter;

    move-result-object v0

    check-cast v0, Lcom/xiaomi/notes/AdapterNoteItem;

    .line 293
    .restart local v0       #adapter:Lcom/xiaomi/notes/AdapterNoteItem;
    invoke-virtual {v0}, Lcom/xiaomi/notes/AdapterNoteItem;->getCount()I

    move-result v2

    if-lez v2, :cond_3

    .line 294
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteListActivity;->restoreXML2DBDialog()V

    goto/16 :goto_0

    .line 296
    :cond_3
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteListActivity;->restoreXML2DB()V

    goto/16 :goto_0

    .line 301
    .end local v0           #adapter:Lcom/xiaomi/notes/AdapterNoteItem;
    :pswitch_d
    invoke-direct {p0, v5}, Lcom/xiaomi/notes/NoteListActivity;->callDialogToSend(I)V

    goto/16 :goto_0

    .line 305
    :pswitch_e
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteListActivity;->showSettingPassword()V

    goto/16 :goto_0

    .line 309
    :pswitch_f
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteListActivity;->gotoAbout()V

    goto/16 :goto_0

    .line 313
    :pswitch_10
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteListActivity;->gotoMore()V

    goto/16 :goto_0

    .line 229
    :pswitch_data_0
    .packed-switch 0x7f070038
        :pswitch_0
        :pswitch_1
        :pswitch_5
        :pswitch_9
        :pswitch_d
        :pswitch_b
        :pswitch_c
        :pswitch_e
        :pswitch_10
        :pswitch_f
        :pswitch_a
    .end packed-switch

    .line 235
    :pswitch_data_1
    .packed-switch 0x0
        :pswitch_3
        :pswitch_2
        :pswitch_2
        :pswitch_4
    .end packed-switch

    .line 247
    :pswitch_data_2
    .packed-switch 0x0
        :pswitch_7
        :pswitch_6
        :pswitch_6
        :pswitch_8
    .end packed-switch
.end method

.method protected onPause()V
    .locals 1

    .prologue
    .line 186
    invoke-super {p0}, Landroid/app/Activity;->onPause()V

    .line 189
    iget-object v0, p0, Lcom/xiaomi/notes/NoteListActivity;->objConfig:[Ljava/lang/Object;

    invoke-static {p0, v0}, Lcom/xiaomi/notes/Tools;->setConfigData(Landroid/app/Activity;[Ljava/lang/Object;)V

    .line 190
    return-void
.end method

.method public onPrepareOptionsMenu(Landroid/view/Menu;)Z
    .locals 2
    .parameter "menu"

    .prologue
    .line 203
    iget v0, p0, Lcom/xiaomi/notes/NoteListActivity;->nState:I

    packed-switch v0, :pswitch_data_0

    .line 222
    :goto_0
    const/4 v0, 0x1

    return v0

    .line 205
    :pswitch_0
    invoke-interface {p1}, Landroid/view/Menu;->clear()V

    .line 206
    invoke-virtual {p0}, Lcom/xiaomi/notes/NoteListActivity;->getMenuInflater()Landroid/view/MenuInflater;

    move-result-object v0

    const v1, 0x7f030009

    invoke-virtual {v0, v1, p1}, Landroid/view/MenuInflater;->inflate(ILandroid/view/Menu;)V

    goto :goto_0

    .line 209
    :pswitch_1
    invoke-interface {p1}, Landroid/view/Menu;->clear()V

    .line 210
    invoke-virtual {p0}, Lcom/xiaomi/notes/NoteListActivity;->getMenuInflater()Landroid/view/MenuInflater;

    move-result-object v0

    const v1, 0x7f03000a

    invoke-virtual {v0, v1, p1}, Landroid/view/MenuInflater;->inflate(ILandroid/view/Menu;)V

    goto :goto_0

    .line 213
    :pswitch_2
    invoke-interface {p1}, Landroid/view/Menu;->clear()V

    goto :goto_0

    .line 216
    :pswitch_3
    invoke-interface {p1}, Landroid/view/Menu;->clear()V

    goto :goto_0

    .line 219
    :pswitch_4
    invoke-interface {p1}, Landroid/view/Menu;->clear()V

    goto :goto_0

    .line 203
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_2
        :pswitch_3
        :pswitch_1
        :pswitch_4
    .end packed-switch
.end method

.method protected onResume()V
    .locals 0

    .prologue
    .line 169
    invoke-super {p0}, Landroid/app/Activity;->onResume()V

    .line 170
    invoke-virtual {p0}, Lcom/xiaomi/notes/NoteListActivity;->synDB()V

    .line 171
    return-void
.end method

.method public setState(I)V
    .locals 7
    .parameter "state"

    .prologue
    const v6, 0x7f05000e

    const/4 v5, -0x1

    const/4 v3, 0x0

    const/4 v4, 0x1

    .line 732
    iget v2, p0, Lcom/xiaomi/notes/NoteListActivity;->nState:I

    if-ne p1, v2, :cond_0

    .line 818
    :goto_0
    return-void

    .line 737
    :cond_0
    iget v2, p0, Lcom/xiaomi/notes/NoteListActivity;->nState:I

    packed-switch v2, :pswitch_data_0

    .line 756
    :goto_1
    :pswitch_0
    iget v2, p0, Lcom/xiaomi/notes/NoteListActivity;->nState:I

    iput v2, p0, Lcom/xiaomi/notes/NoteListActivity;->nPreState:I

    .line 757
    iput p1, p0, Lcom/xiaomi/notes/NoteListActivity;->nState:I

    .line 760
    iget v2, p0, Lcom/xiaomi/notes/NoteListActivity;->nState:I

    packed-switch v2, :pswitch_data_1

    goto :goto_0

    .line 762
    :pswitch_1
    iput v5, p0, Lcom/xiaomi/notes/NoteListActivity;->nFolderId:I

    .line 763
    iget-object v2, p0, Lcom/xiaomi/notes/NoteListActivity;->txtTitle:Landroid/widget/TextView;

    invoke-virtual {v2, v6}, Landroid/widget/TextView;->setText(I)V

    .line 764
    iget v2, p0, Lcom/xiaomi/notes/NoteListActivity;->nFolderId:I

    invoke-virtual {p0, v2}, Lcom/xiaomi/notes/NoteListActivity;->synDB(I)V

    goto :goto_0

    .line 742
    :pswitch_2
    iget-object v2, p0, Lcom/xiaomi/notes/NoteListActivity;->listNote:Landroid/widget/ListView;

    invoke-virtual {v2}, Landroid/widget/ListView;->getAdapter()Landroid/widget/ListAdapter;

    move-result-object v0

    check-cast v0, Lcom/xiaomi/notes/AdapterNoteItem;

    .line 743
    .local v0, adapter:Lcom/xiaomi/notes/AdapterNoteItem;
    invoke-virtual {v0, v3}, Lcom/xiaomi/notes/AdapterNoteItem;->setEditState(I)V

    .line 744
    invoke-virtual {v0}, Lcom/xiaomi/notes/AdapterNoteItem;->removeAllEditFlag()V

    .line 745
    iget-object v2, p0, Lcom/xiaomi/notes/NoteListActivity;->listNote:Landroid/widget/ListView;

    invoke-virtual {v2, v0}, Landroid/widget/ListView;->setAdapter(Landroid/widget/ListAdapter;)V

    .line 747
    invoke-direct {p0, v3}, Lcom/xiaomi/notes/NoteListActivity;->setVisableEditDialog(Z)V

    goto :goto_1

    .line 750
    .end local v0           #adapter:Lcom/xiaomi/notes/AdapterNoteItem;
    :pswitch_3
    invoke-direct {p0, v3}, Lcom/xiaomi/notes/NoteListActivity;->setVisableFolderDialog(Z)V

    goto :goto_1

    .line 767
    :pswitch_4
    iget v2, p0, Lcom/xiaomi/notes/NoteListActivity;->nFolderId:I

    invoke-virtual {p0, v2}, Lcom/xiaomi/notes/NoteListActivity;->getFolderName(I)Ljava/lang/String;

    move-result-object v1

    .line 768
    .local v1, name:Ljava/lang/String;
    if-nez v1, :cond_1

    .line 769
    iget-object v2, p0, Lcom/xiaomi/notes/NoteListActivity;->txtTitle:Landroid/widget/TextView;

    invoke-virtual {v2, v6}, Landroid/widget/TextView;->setText(I)V

    .line 773
    :goto_2
    iget v2, p0, Lcom/xiaomi/notes/NoteListActivity;->nFolderId:I

    invoke-virtual {p0, v2}, Lcom/xiaomi/notes/NoteListActivity;->synDB(I)V

    goto :goto_0

    .line 771
    :cond_1
    iget-object v2, p0, Lcom/xiaomi/notes/NoteListActivity;->txtTitle:Landroid/widget/TextView;

    invoke-virtual {v2, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_2

    .line 776
    .end local v1           #name:Ljava/lang/String;
    :pswitch_5
    iget-object v2, p0, Lcom/xiaomi/notes/NoteListActivity;->btnEditOk:Landroid/widget/Button;

    const v3, 0x7f020022

    invoke-virtual {v2, v3}, Landroid/widget/Button;->setBackgroundResource(I)V

    .line 777
    iget-object v2, p0, Lcom/xiaomi/notes/NoteListActivity;->btnEditOk:Landroid/widget/Button;

    const v3, 0x7f050022

    invoke-virtual {v2, v3}, Landroid/widget/Button;->setText(I)V

    .line 778
    iget-object v2, p0, Lcom/xiaomi/notes/NoteListActivity;->btnEditOk:Landroid/widget/Button;

    invoke-virtual {v2, v5}, Landroid/widget/Button;->setTextColor(I)V

    .line 779
    iget-object v2, p0, Lcom/xiaomi/notes/NoteListActivity;->listNote:Landroid/widget/ListView;

    invoke-virtual {v2}, Landroid/widget/ListView;->getAdapter()Landroid/widget/ListAdapter;

    move-result-object v0

    check-cast v0, Lcom/xiaomi/notes/AdapterNoteItem;

    .line 780
    .restart local v0       #adapter:Lcom/xiaomi/notes/AdapterNoteItem;
    invoke-virtual {v0, v4}, Lcom/xiaomi/notes/AdapterNoteItem;->setEditState(I)V

    .line 781
    iget-object v2, p0, Lcom/xiaomi/notes/NoteListActivity;->listNote:Landroid/widget/ListView;

    invoke-virtual {v2, v0}, Landroid/widget/ListView;->setAdapter(Landroid/widget/ListAdapter;)V

    .line 783
    invoke-direct {p0, v4}, Lcom/xiaomi/notes/NoteListActivity;->setVisableEditDialog(Z)V

    goto :goto_0

    .line 787
    .end local v0           #adapter:Lcom/xiaomi/notes/AdapterNoteItem;
    :pswitch_6
    iget-object v2, p0, Lcom/xiaomi/notes/NoteListActivity;->btnEditOk:Landroid/widget/Button;

    const v3, 0x7f020023

    invoke-virtual {v2, v3}, Landroid/widget/Button;->setBackgroundResource(I)V

    .line 788
    iget v2, p0, Lcom/xiaomi/notes/NoteListActivity;->nPreState:I

    packed-switch v2, :pswitch_data_2

    .line 796
    :goto_3
    :pswitch_7
    iget-object v2, p0, Lcom/xiaomi/notes/NoteListActivity;->btnEditOk:Landroid/widget/Button;

    const/high16 v3, -0x3400

    invoke-virtual {v2, v3}, Landroid/widget/Button;->setTextColor(I)V

    .line 797
    iget-object v2, p0, Lcom/xiaomi/notes/NoteListActivity;->listNote:Landroid/widget/ListView;

    invoke-virtual {v2}, Landroid/widget/ListView;->getAdapter()Landroid/widget/ListAdapter;

    move-result-object v0

    check-cast v0, Lcom/xiaomi/notes/AdapterNoteItem;

    .line 798
    .restart local v0       #adapter:Lcom/xiaomi/notes/AdapterNoteItem;
    const/4 v2, 0x2

    invoke-virtual {v0, v2}, Lcom/xiaomi/notes/AdapterNoteItem;->setEditState(I)V

    .line 799
    iget-object v2, p0, Lcom/xiaomi/notes/NoteListActivity;->listNote:Landroid/widget/ListView;

    invoke-virtual {v2, v0}, Landroid/widget/ListView;->setAdapter(Landroid/widget/ListAdapter;)V

    .line 801
    invoke-direct {p0, v4}, Lcom/xiaomi/notes/NoteListActivity;->setVisableEditDialog(Z)V

    goto/16 :goto_0

    .line 790
    .end local v0           #adapter:Lcom/xiaomi/notes/AdapterNoteItem;
    :pswitch_8
    iget-object v2, p0, Lcom/xiaomi/notes/NoteListActivity;->btnEditOk:Landroid/widget/Button;

    const v3, 0x7f05001c

    invoke-virtual {v2, v3}, Landroid/widget/Button;->setText(I)V

    goto :goto_3

    .line 793
    :pswitch_9
    iget-object v2, p0, Lcom/xiaomi/notes/NoteListActivity;->btnEditOk:Landroid/widget/Button;

    const v3, 0x7f05001d

    invoke-virtual {v2, v3}, Landroid/widget/Button;->setText(I)V

    goto :goto_3

    .line 805
    :pswitch_a
    invoke-direct {p0, v4}, Lcom/xiaomi/notes/NoteListActivity;->setVisableFolderDialog(Z)V

    .line 806
    iget v2, p0, Lcom/xiaomi/notes/NoteListActivity;->nPreState:I

    packed-switch v2, :pswitch_data_3

    .line 814
    :goto_4
    :pswitch_b
    iget-object v2, p0, Lcom/xiaomi/notes/NoteListActivity;->edtFolderName:Landroid/widget/EditText;

    invoke-virtual {v2}, Landroid/widget/EditText;->requestFocus()Z

    .line 815
    invoke-direct {p0}, Lcom/xiaomi/notes/NoteListActivity;->showSoftKey()V

    goto/16 :goto_0

    .line 808
    :pswitch_c
    iget-object v2, p0, Lcom/xiaomi/notes/NoteListActivity;->txtFolderName:Landroid/widget/TextView;

    const v3, 0x7f05001a

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(I)V

    goto :goto_4

    .line 811
    :pswitch_d
    iget-object v2, p0, Lcom/xiaomi/notes/NoteListActivity;->txtFolderName:Landroid/widget/TextView;

    const v3, 0x7f05001b

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(I)V

    goto :goto_4

    .line 737
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_2
        :pswitch_3
        :pswitch_0
        :pswitch_2
    .end packed-switch

    .line 760
    :pswitch_data_1
    .packed-switch 0x0
        :pswitch_1
        :pswitch_5
        :pswitch_a
        :pswitch_4
        :pswitch_6
    .end packed-switch

    .line 788
    :pswitch_data_2
    .packed-switch 0x0
        :pswitch_8
        :pswitch_7
        :pswitch_7
        :pswitch_9
    .end packed-switch

    .line 806
    :pswitch_data_3
    .packed-switch 0x0
        :pswitch_c
        :pswitch_b
        :pswitch_b
        :pswitch_d
    .end packed-switch
.end method

.method public synDB()V
    .locals 1

    .prologue
    .line 1162
    iget v0, p0, Lcom/xiaomi/notes/NoteListActivity;->nFolderId:I

    invoke-virtual {p0, v0}, Lcom/xiaomi/notes/NoteListActivity;->synDB(I)V

    .line 1163
    return-void
.end method

.method public synDB(I)V
    .locals 3
    .parameter "id"

    .prologue
    .line 1166
    iget-object v1, p0, Lcom/xiaomi/notes/NoteListActivity;->listNote:Landroid/widget/ListView;

    invoke-virtual {v1}, Landroid/widget/ListView;->getAdapter()Landroid/widget/ListAdapter;

    move-result-object v0

    check-cast v0, Lcom/xiaomi/notes/AdapterNoteItem;

    .line 1167
    .local v0, adapter:Lcom/xiaomi/notes/AdapterNoteItem;
    invoke-static {p1}, Lcom/xiaomi/notes/NoteListActivity;->isFolder(I)Z

    move-result v1

    if-eqz v1, :cond_0

    .line 1168
    iget-object v1, p0, Lcom/xiaomi/notes/NoteListActivity;->db:Lcom/xiaomi/notes/DBOperate;

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Lcom/xiaomi/notes/DBOperate;->getFolder(I)Ljava/util/List;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/xiaomi/notes/AdapterNoteItem;->setFolderInfo(Ljava/util/List;)V

    .line 1169
    iget-object v1, p0, Lcom/xiaomi/notes/NoteListActivity;->db:Lcom/xiaomi/notes/DBOperate;

    invoke-virtual {v1, p1}, Lcom/xiaomi/notes/DBOperate;->getNotes(I)Ljava/util/List;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/xiaomi/notes/AdapterNoteItem;->setNoteInfo(Ljava/util/List;)V

    .line 1175
    :goto_0
    iget-object v1, p0, Lcom/xiaomi/notes/NoteListActivity;->listNote:Landroid/widget/ListView;

    invoke-virtual {v1, v0}, Landroid/widget/ListView;->setAdapter(Landroid/widget/ListAdapter;)V

    .line 1176
    return-void

    .line 1171
    :cond_0
    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/xiaomi/notes/AdapterNoteItem;->setFolderInfo(Ljava/util/List;)V

    .line 1172
    iget-object v1, p0, Lcom/xiaomi/notes/NoteListActivity;->db:Lcom/xiaomi/notes/DBOperate;

    invoke-virtual {v1, p1}, Lcom/xiaomi/notes/DBOperate;->getNotes(I)Ljava/util/List;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/xiaomi/notes/AdapterNoteItem;->setNoteInfo(Ljava/util/List;)V

    goto :goto_0
.end method
